package com.mrd.permissions;

import java.util.concurrent.Callable;

import com.mrd.gtimpframe.entity.SysLog;
import com.mrd.redis.JedisClientClusterImpl;

/**
 * 日志异步提交到redis队列
 * 
 * @author han
 *
 */
public class LogSubmitTask implements Callable<String> {
  private JedisClientClusterImpl redisClusterClient;
  private SysLog sysLog;

  LogSubmitTask() {
    // 空构造器
  }

  LogSubmitTask(JedisClientClusterImpl redisClusterClient, SysLog sysLog) {
    // 空构造器
    this.redisClusterClient = redisClusterClient;
    this.sysLog = sysLog;
  }

  @Override
  public String call() throws Exception {
    redisClusterClient.leftPush("sysLog", sysLog);
    return null;
  }

}
